//
//  GAKKIBaseView.m
//  GANGAIKit
//
//  Created by fh on 2019/11/5.
//  Copyright © 2019 cashchina. All rights reserved.
//

#import "GAKKIBaseView.h"

@implementation GAKKIBaseView

- (void)dealloc {
    if (kDebugViewRelease) {
#ifdef DEBUG
        DBLog(@"\n ----------- 视图 %@ 销毁了 ----------- \n",[self class]);
#endif
    }
}

#pragma - Public

/// 配置子视图
- (void)setupView {
    /// 子类实现
}

+ (GAKKIBaseView *)gakki_makeView:(void (^)(GAKKIBaseView * _Nonnull))block {
    GAKKIBaseView *view = [[GAKKIBaseView alloc] init];
    if (block) {
        block(view);
    }
    return view;
}

- (GAKKIViewFrame)gakki_frame {
    return ^(CGRect frame) {
        self.frame = frame;
        return self;
    };
}
- (GAKKIViewBackgroundColor)gakki_backgroundColor {
    return ^(UIColor *backgroundColor) {
        self.backgroundColor = backgroundColor;
        return self;
    };
}

@end
